package enterprise.web_jpa_war.entity;

import java.io.Serializable;
import javax.persistence.*;

/**
 *
 * @author Thomas
 */
@Entity
public class Item implements Serializable {
    private static final long serialVersionUID = 1L;
    
    /**  */
    @Id
    @Column(name = "ISBN")
    private String isbn;
    /**  */
    @Column(name = "DISPO")
    private Boolean dispo;
    /**  */
    @OneToOne
    private Oeuvre oeuvre;

    public Item(String isbn, Boolean dispo, Oeuvre oeuvre) {
        this.isbn = isbn;
        this.dispo = dispo;
        this.oeuvre = oeuvre;
    }

    public Item() {
        
    }

    public Boolean getDispo() {
        return dispo;
    }

    public String getIsbn() {
        return isbn;
    }

    public Oeuvre getOeuvre() {
        return oeuvre;
    }

    public void setDispo(Boolean dispo) {
        this.dispo = dispo;
    }

    public void setIsbn(String isbn) {
        this.isbn = isbn;
    }

    public void setOeuvre(Oeuvre oeuvre) {
        this.oeuvre = oeuvre;
    }
    
    public static long getSerialVersionUID() {
        return serialVersionUID;
    }
       
    @Override
    public String toString() {
        return "enterprise.web_jpa_war.entity.Item[ id=" + this.isbn + " ]";
    }
    
}
